日常学习记录 您所在的位置:网站首页 python 深度学习 图像识别 日常学习记录

日常学习记录

2024-07-09 03:22| 来源: 网络整理| 查看: 265

日常学习记录——openpyxl保存操作

锂盐块呀: 我刚刚试了一下这个博客的内容,博客地址:https://blog.csdn.net/u010229047/article/details/104483120,可以读取出复选框的值,您可以参考一下,我的代码为: # win32com excel = gencache.EnsureDispatch('Excel.Application') excel.DisplayAlerts = False wbtest = excel.Workbooks.Open(r"E:\My Word\study\界面demo\watermelon.xlsx") wstest = wbtest.Worksheets('Sheet1') print('Shape count: %s' % len(wstest.Shapes)) for shape in wstest.Shapes: if shape.Type == 8: # form control if 'Check Box' in shape.Name: print('%s: %s' % (shape.AlternativeText, shape.ControlFormat.Value)) 输出提示: Shape count: 1 复选框 1: -4146



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有